﻿<Window x:Class="PatientRegistrationWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:lib="clr-namespace:HMSLibrary;assembly=HMSLibrary"
    xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
    SizeToContent="WidthAndHeight" WindowStyle="None" AllowsTransparency="True" Icon="/Horizon.HMS;component/Images/POSIcon.ico"
    xmlns:local="clr-namespace:Horizon.HMS" WindowStartupLocation="CenterScreen" Background="Transparent" xmlns:my="http://schemas.microsoft.com/wpf/2008/toolkit">
    <Border Background="White" BorderBrush="Navy" BorderThickness="2" CornerRadius="10" Width="600" Height="680">
        <Grid Margin="10" Background="{StaticResource WindowBackground}">
            <Grid.RowDefinitions>
                <RowDefinition Height="30"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBlock Margin="20,2" FontSize="16" FontWeight="SemiBold" Foreground="{StaticResource TextLabelColor}">
             <Run Text="HMS(" />
            <Run Text="Your management partner..." FontSize="10" FontStyle="Italic"/>
            <Run Text=")" />
            <Run Text=" :: "/>
            <Run Text="Patient Registration"/>
            </TextBlock>
            <Button Grid.Column="2" Style="{DynamicResource CloseButtonStyle}" Width="11.195" Content="Button" x:Name="CloseButton" Cursor="Hand" HorizontalAlignment="Right" Margin="0,5.583,7.468,0" VerticalAlignment="Top" Height="12.77"/>
            <Button Grid.Column="2" Style="{DynamicResource MinimizeButtonStyle}" Width="12.402" Content="Button" x:Name="MinimizeButton" Cursor="Hand" HorizontalAlignment="Right" Margin="0,4.733,24.606,0" VerticalAlignment="Top" Height="13.537"/>
            <Path Data="M18,115 L616,115" Fill="#FFF4F4F5" Height="1" Margin="5" Width="600" Stretch="Fill" Stroke="White" Grid.Row="1" Grid.ColumnSpan="2"/>
            <TabControl Grid.Row="2" Name="MainStack" Margin="10" Height="590">
                <TabItem Header="Patient Registration" >
                    <Grid Background="{StaticResource WindowBackground}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="110"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="80"/>
                            <ColumnDefinition Width="130"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="70"/>
                        </Grid.RowDefinitions>
                        <TextBlock Text="First Name:" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Grid.ColumnSpan="2" Watermark="First Name" Name="FirstNameTextBox" Margin="2"/>
                        <TextBlock Text="Last Name:" Grid.Row="1" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Grid.ColumnSpan="2" Watermark="Last Name" Grid.Row="1" Name="LastNameTextBox" Margin="2"/>
                        <TextBlock Text="Sur Name:" Grid.Row="2" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Grid.ColumnSpan="2" Watermark="Sur Name" Grid.Row="2" Name="SurNameTextBox" Margin="2"/>
                        <TextBlock Text="Address:" Grid.Row="3" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Grid.ColumnSpan="2" Watermark="Address" Grid.Row="3" Name="AddressTextBox" Margin="2"/>
                        <TextBlock Text="Tel. No.:" Grid.Row="4" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Grid.ColumnSpan="2" Watermark="Telephone no" Grid.Row="4" Name="TelNoTextBox" Margin="2"/>
                        <TextBlock Text="Mobile No.:" Grid.Row="5" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Grid.ColumnSpan="2" Watermark="Mobile no."  Grid.Row="5" Name="MobileNoTextBox" Margin="2"/>
                        <TextBlock Text="Gender:" Grid.Row="6" Style="{StaticResource TextBlockStyle}"/>
                        <StackPanel Grid.Column="1" Grid.Row="6" Margin="4" Orientation="Horizontal">
                            <RadioButton Content="Male" Name="MaleRadioButton" Margin="5,2" GroupName="g" IsChecked="True"/>
                            <RadioButton Content="Female" Name="FemaleRadioButton" GroupName="g" Margin="5,2" />
                        </StackPanel>
                        <TextBlock Text="Date of Birth:" Grid.Row="7" Style="{StaticResource TextBlockStyle}" />
                        <DatePicker Height="28" Name="DOBDatePicker" Grid.Column="1" Grid.Row="7" Width="125" HorizontalAlignment="Left"/>
                        <TextBlock Text="Age:" Grid.Column="2" Grid.Row="7"  Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="3" Grid.Row="7" Watermark="Age" Name="AgeTextBox" Margin="2"/>
                        <TextBlock Text="Language:" Grid.Row="8" Style="{StaticResource TextBlockStyle}"/>
                        <ComboBox Margin="2" Grid.Row="8" Grid.Column="1" Name="LanguageComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
                        <TextBlock Text="Religion:" Grid.Row="8" Grid.Column="2" Style="{StaticResource TextBlockStyle}"/>
                        <ComboBox Margin="2" Name="ReligionComboBox" Grid.Row="8" Grid.Column="3" DisplayMemberPath="Name" SelectedValuePath="ID"/>
                        <TextBlock Text="Email:" Grid.Row="9" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Email" Grid.Row="9" Grid.ColumnSpan="2" Name="EmailTextBox" Margin="2"/>
                        <TextBlock Text="Marital Status:" Grid.Row="10" Style="{StaticResource TextBlockStyle}"/>
                        <ComboBox Grid.Column="1" Grid.Row="10"  Margin="2" Name="MaritalStatusComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
                        <TextBlock Text="Occupation:" Grid.Column="2" Grid.Row="10" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="3" Grid.Row="10" Watermark="Occupation" Name="OccupationTextBox" Margin="2"/>
                        <TextBlock Text="BloodGroup:" Grid.Row="11" Style="{StaticResource TextBlockStyle}"/>
                        <ComboBox Grid.Column="1" Grid.Row="11" Margin="2" Name="BloodGroupComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
                        <TextBlock Text="Diet:" Grid.Column="2" Grid.Row="11" Style="{StaticResource TextBlockStyle}"/>
                        <ComboBox Margin="2" Grid.Column="3" Grid.Row="11" Name="DietComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
                        <TextBlock Text="Patient Type:" Grid.Row="12" Style="{StaticResource TextBlockStyle}"/>
                        <ComboBox Grid.Column="1" Grid.Row="12" Margin="2" Name="PatientTypeComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
                        <TextBlock Text="Reg. Date:" Grid.Row="12" Grid.Column="2" Style="{StaticResource TextBlockStyle}"/>
                        <DatePicker Grid.Column="3" Height="28" Name="RegDatePicker" Grid.Row="12" Width="125" HorizontalAlignment="Left"/>
                        <TextBlock Text="Assigned Dr.:" Grid.Row="14" Style="{StaticResource TextBlockStyle}"/>
                        <ComboBox Grid.Column="1" Grid.Row="14" Margin="2" Grid.ColumnSpan="2" Name="AssignedDrComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
                        <TextBlock Text="Referred Dr.:" Grid.Row="15" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Referred Dr." Grid.ColumnSpan="2"  Grid.Row="15" Name="ReferedDrTextBox" Margin="2"/>
                        <TextBlock Text="Sibling:" Grid.Row="16" Style="{StaticResource TextBlockStyle}"/>
                        <StackPanel Grid.Row="16" Grid.Column="1" Orientation="Horizontal">
                            <TextBlock Text="Brother:" Style="{StaticResource TextBlockStyle}"/>
                            <extToolkit:WatermarkTextBox Watermark="Brother" Name="BrotherTextBox" Margin="2" Width="80"/>
                        </StackPanel>
                        <TextBlock Grid.Row="16" Grid.Column="2" Text="Sister:" HorizontalAlignment="Right" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Row="16" Grid.Column="3" Watermark="Sister" HorizontalAlignment="Left" Name="SisterTextBox" Margin="2" Width="80"/>
                        <TextBlock Text="Child:" Grid.Row="17" Style="{StaticResource TextBlockStyle}"/>
                        <StackPanel Grid.Column="1" Grid.Row="17" Orientation="Horizontal">
                            <TextBlock Text="Boys:" Style="{StaticResource TextBlockStyle}"/>
                            <extToolkit:WatermarkTextBox Watermark="Boys" Name="BoysTextBox" Margin="15,2" Width="80"/>
                        </StackPanel>
                        <TextBlock Text="Girls:" Style="{StaticResource TextBlockStyle}" Grid.Column="2" HorizontalAlignment="Right" Grid.Row="17" />
                        <extToolkit:WatermarkTextBox Watermark="Girls" Name="GirlsTextBox" Margin="2" Width="80" Grid.Column="3" HorizontalAlignment="Left" Grid.Row="17" />
                        <TextBlock Text="Remarks:" Grid.Row="18" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Remarks" Grid.Row="18" Height="60" Name="RemarksTextBox" Margin="2" AcceptsReturn="True" TextWrapping="WrapWithOverflow" VerticalScrollBarVisibility="Auto" Grid.ColumnSpan="3"/>
                        <TextBlock Grid.Column="3" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Left">
                            <Run Text="Patient ID:"/>
                            <Run Name="PatientIDTextBlock"/>
                        </TextBlock>
                        <Image Margin="5" Name="PatientImage" Grid.Column="3" Grid.RowSpan="4" Grid.Row="1" HorizontalAlignment="Stretch" Source="/Horizon.HMS;component/Images/NoImage.jpg" />
                        <Button Grid.Column="3" Grid.Row="5" Width="40" Height="25" Content="...." Name="ImageButton"/>
                    </Grid>
                </TabItem>
                <TabItem Header="Patient Guardians" Name="PatientGuardiansTabItem">
                    <Grid Background="{StaticResource WindowBackground}" Height="590">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="70"/>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="85"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="Guardian Name:" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Grid.ColumnSpan="3" Watermark="Guardian Name" Name="GuardianNameTextBox" Margin="2"/>
                        <TextBlock Text="Relationship:" Grid.Row="1" Style="{StaticResource TextBlockStyle}"/>
                            <ComboBox Grid.Column="1" Grid.Row="1"  Margin="2" Name="RelationshipDrComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
                            <TextBlock Text="Age:" Grid.Row="1" Grid.Column="2" Style="{StaticResource TextBlockStyle}"/>
                            <extToolkit:WatermarkTextBox Grid.Row="1" Grid.Column="3" Width="80" HorizontalAlignment="Left" Watermark="Age" Name="GuardianAgeTextBox" Margin="2"/>
                        <TextBlock Text="Contact No:" Grid.Row="2" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Contact No" Grid.Row="2" Name="ContactNoTextBox" Margin="2"/>
                        <TextBlock Text="Health Status:" Grid.Column="2" Grid.Row="2"  Style="{StaticResource TextBlockStyle}"/>
                        <ComboBox Grid.Column="3" Grid.Row="2" Margin="2" Name="healthStatusComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
                        <TextBlock Text="Complaints:" Grid.Row="3" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Row="3" Grid.ColumnSpan="3" Grid.Column="1" Watermark="Complaints" Name="GuardianComplaintsTextBox" Margin="2"/>
                        <TextBlock Text="Notes:" Grid.Row="4" Style="{StaticResource TextBlockStyle}"/>
                        <extToolkit:WatermarkTextBox Grid.Row="4" Grid.ColumnSpan="3" Grid.Column="1" Watermark="Notes" Name="GuardianNotesTextBox" Margin="2" VerticalScrollBarVisibility="Auto" AcceptsReturn="True" TextWrapping="WrapWithOverflow"/>
                        <Button Content="Add" Grid.Row="5" Grid.ColumnSpan="4" Width="50" Name="AddGuardianButton"/>
                        <my:DataGrid AutoGenerateColumns="False" Margin="5" Height="330" VerticalAlignment="Top" IsReadOnly="True" Grid.Row="6" Name="GuardianDataGrid" Grid.ColumnSpan="4">
                            <my:DataGrid.Columns>
                                <my:DataGridTextColumn Header="Guardian Name" Width="100" Binding="{Binding GuardianName}"/>
                                <my:DataGridTextColumn Header="Relationship" Binding="{Binding Relationship}" />
                                <my:DataGridTextColumn Header="Contact No" Binding="{Binding ContactNo}" />
                                <my:DataGridTextColumn Header="Age" Binding="{Binding age}" />
                                <my:DataGridTextColumn Header="Health Status" Binding="{Binding healthStatusName}" />
                                <my:DataGridTextColumn Header="Complaints" Binding="{Binding Complaints}"/>
                            </my:DataGrid.Columns>
                        </my:DataGrid>
                    </Grid>
                </TabItem>
            </TabControl>
            <StackPanel Name="FindStackPanel" Grid.Row="2" Margin="5" Visibility="Collapsed">
                <lib:SearchBox x:Name="Ctrl" HorizontalAlignment="Right" Margin="10,5"
					Width="249" Height="22" Mode="{Binding SelectedValue.Content, ElementName=SearchMode}"
					Prompt="Search text" ToolTip="Type to search the current view">
                    <lib:SearchBox.ContextMenu>
                        <ContextMenu>
                            <MenuItem Header="Option 1" IsCheckable="True"/>
                            <MenuItem Header="Option 2" IsCheckable="True"/>
                        </ContextMenu>
                    </lib:SearchBox.ContextMenu>
                    <lib:SearchBox.LayoutTransform>
                        <ScaleTransform ScaleX="{Binding Value, ElementName=Scaler}" 
																						ScaleY="{Binding Value, ElementName=Scaler}"/>
                    </lib:SearchBox.LayoutTransform>
                </lib:SearchBox>
                <extToolkit:BusyIndicator Name="BusyIndicator1" Grid.ColumnSpan="3"/>
                <ScrollViewer Margin="5" MaxHeight="630">
                    <my:DataGrid Grid.Row="2" Name="SearchDataGrid" Style="{StaticResource SerachDataGridStyle}">
                        <my:DataGrid.Columns>
                            <my:DataGridTemplateColumn Width="20">
                                <my:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <Button Template="{StaticResource DeleteButtonTemp}" Name="DeleteButton" Click="DeleteButton_Click"/>
                                    </DataTemplate>
                                </my:DataGridTemplateColumn.CellTemplate>
                            </my:DataGridTemplateColumn>
                            <my:DataGridTextColumn Header="First Name" Binding="{Binding FirstName}" />
                            <my:DataGridTextColumn Header="Last Name" Binding="{Binding LastName}" />
                            <my:DataGridTextColumn Header="Sur Name" Binding="{Binding SurName}" />
                            <my:DataGridTextColumn Header="Gender" Binding="{Binding Gender}" />
                            <my:DataGridTextColumn Header="Address" Binding="{Binding Address}" />
                            <my:DataGridTextColumn Header="Tel. No" Binding="{Binding TelephoneNo}" />
                            <my:DataGridTextColumn Header="Mobile No" Binding="{Binding MobileNo}" />
                            <my:DataGridTextColumn Header="Contact Person" Binding="{Binding ContactPerson}" />
                            <my:DataGridTextColumn Header="Email" Binding="{Binding Email}" />
                            <my:DataGridTextColumn Header="Reg Date" Binding="{Binding RegistrationDate, StringFormat={}{0:dd/MM/yyyy}}" />
                            <my:DataGridTextColumn Header="DOB" Binding="{Binding DOB, StringFormat={}{0:dd/MM/yyyy}}" />
                            <my:DataGridTextColumn Header="Age" Binding="{Binding Age}" />
                            <my:DataGridTextColumn Header="Occupation" Binding="{Binding Occupation}" />
                        </my:DataGrid.Columns>
                    </my:DataGrid>
                </ScrollViewer>
            </StackPanel>
            <local:SidePanel Grid.Row="2" x:Name="TransSidePanel" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="2"/>
        </Grid>
    </Border>
</Window>
